package cn.ssm.service.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.ssm.dao.AdminMapper;
import cn.ssm.pojo.Admin;
import cn.ssm.service.AdminService;

/**
 * 管理用户业务实现类
 * 
 * @author 李金栋
 *
 */

@Service
public class AdminServiceImpl implements AdminService {
	@Autowired
	AdminMapper adminMapper;

	// 查询全部管理用户
	@Override
	public List<Admin> getAdminList(Map<String, Object> paramas) {
		return adminMapper.getAdminList(paramas);
	}

	/**
	 * 添加用户
	 */
	@Override
	public int addAdmin(Admin admin) {
		return adminMapper.addAdmin(admin);
	}

	/**
	 * 修改用户
	 */
	@Override
	public int updateAdmin(Admin admin) {
		return adminMapper.updateAdmin(admin);
	}

	/**
	 * 删除用户
	 */
	@Override
	public int deleteAdmin(Admin admin) {
		return adminMapper.deleteAdmin(admin);
	}

	/**
	 * 获取用户总数
	 */
	@Override
	public int getAdminCount() {
		return adminMapper.getAdminCount();
	}

	/**
	 * 获取指定用户
	 */
	@Override
	public Admin getAdmin(String adminCode, String adminPassword) {
		return adminMapper.getAdmin(adminCode, adminPassword);
	}

	@Override
	public int selectAdmin(String adminName) {
		return adminMapper.selectAdmin(adminName);
	}
	

	@Override
	public List<Admin> getAdmin(Admin admin) {
		return adminMapper.getAdmin(admin);
	}

	@Override
	public List<Admin> getAdmins(Admin admin) {
		return adminMapper.getAdmins(admin);
	}

	@Override
	public List<Admin> getAdminCheck(Admin admin) {
		return adminMapper.getAdminCheck(admin);
	}
}
